1. Technical Field
The present invention relates to an apparatus for graphics processing in general, and in particular to an apparatus for generating graphics images within a graphics system. Still more particularly, the present invention relates to a graphics adapter capable of supporting lighting models from Application Programming Interfaces (APIs) within a graphics system.
2. Description of the Prior Art
Within a graphics system, a software application typically generates a three-dimensional (3-D) graphics scene and provides the scene along with its lighting attributes to an Application Programming Interface (API). Each 3-D graphics scene is made up of a number of polygons that are delimited by a set of vertices. Each vertex owns attributes such as a material color, a normal, and a position. In addition, each graphics scene itself has a set of attributes such as ambient color and light sources. There is also a number of properties associated with each light source, including an ambient light intensity and the location of the light source. All these attributes are utilized to model different types of reflections coming from an object.
Today, there are two industry-standard 3-D graphics APIs that are commonly utilized for modelling light sources, namely, OpenGL and PHIGS. When the attributes of all light sources and surfaces are known, lighting from an object in a graphics scene can be evaluated utilizing a lighting equation given by one of the two above-mentioned 3-D graphics APIs. Each API defines a lighting equation as an approximation to the perceived color of an object that reflects light from defined sources. Because of cost and other related reasons, most of the prior art graphics adapters can only provide support for one of the two above-mentioned 3-D graphics APIs. It is desirable to provide a graphics adapter that is capable of supporting both 3-D graphics APIs.
In accordance with a preferred embodiment of the present invention, a dot product machine is utilized within a graphics adapter to perform geometry computations, regardless of the Application Programming Interface (API) format in which the graphics data is expressed. In addition, a control means is utilized to multiplex between a set of graphics data having a first API format and a set of graphics data having a second API format in order to determine the inputs of the dot product machine. As a result, lighting models from multiple APIs can be supported by a single graphics adapter.
All objects, features, and advantages of the present invention will become apparent in the following detailed written description.